package com.woniu.custom.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName zy_custom_level
 */
@TableName(value ="zy_custom_level")
@Data
public class ZyCustomLevel implements Serializable {
    /**
     * 客户等级编号
     */
    @TableId
    private String id;

    /**
     * 客户等级名称
     */
    private String customLevelName;

    /**
     * 折扣（等级权益
     */
    private BigDecimal customeCost;

    /**
     * 升级条件
     */
    private String customLevelCondition;

    /**
     * 1.启用 2.删除
     */
    private Integer customLevelStates;

    /**
     * 客户等级创建时间
     */
    private Date customLevelCreateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZyCustomLevel other = (ZyCustomLevel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomLevelName() == null ? other.getCustomLevelName() == null : this.getCustomLevelName().equals(other.getCustomLevelName()))
            && (this.getCustomeCost() == null ? other.getCustomeCost() == null : this.getCustomeCost().equals(other.getCustomeCost()))
            && (this.getCustomLevelCondition() == null ? other.getCustomLevelCondition() == null : this.getCustomLevelCondition().equals(other.getCustomLevelCondition()))
            && (this.getCustomLevelStates() == null ? other.getCustomLevelStates() == null : this.getCustomLevelStates().equals(other.getCustomLevelStates()))
            && (this.getCustomLevelCreateTime() == null ? other.getCustomLevelCreateTime() == null : this.getCustomLevelCreateTime().equals(other.getCustomLevelCreateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomLevelName() == null) ? 0 : getCustomLevelName().hashCode());
        result = prime * result + ((getCustomeCost() == null) ? 0 : getCustomeCost().hashCode());
        result = prime * result + ((getCustomLevelCondition() == null) ? 0 : getCustomLevelCondition().hashCode());
        result = prime * result + ((getCustomLevelStates() == null) ? 0 : getCustomLevelStates().hashCode());
        result = prime * result + ((getCustomLevelCreateTime() == null) ? 0 : getCustomLevelCreateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customLevelName=").append(customLevelName);
        sb.append(", customeCost=").append(customeCost);
        sb.append(", customLevelCondition=").append(customLevelCondition);
        sb.append(", customLevelStates=").append(customLevelStates);
        sb.append(", customLevelCreateTime=").append(customLevelCreateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}